// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Abilities/GameplayAbility.h"
#include "InteractionOption.h"
#include "IInteractionInstigator.generated.h"

struct FInteractionQuery;

/**
 * 交互发起者接口的UInterface定义
 */
UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint))
class UInteractionInstigator : public UInterface
{
	GENERATED_BODY()
};

/**
 * 交互发起者接口，允许在交互过程中添加仲裁逻辑
 * 例如，某些游戏会向用户显示菜单以选择要执行的交互方式
 * 这允许您处理多个匹配的交互选项（假设您的ULyraGameplayAbility_Interact子类生成多个选项）
 */
class IInteractionInstigator
{
	GENERATED_BODY()

public:
	/**
	 * 当有多个交互选项需要决定时调用此函数
	 * @param InteractQuery 交互查询参数
	 * @param InteractOptions 交互选项数组
	 * @return 返回最佳交互选项
	 */
	virtual FInteractionOption ChooseBestInteractionOption(const FInteractionQuery& InteractQuery, const TArray<FInteractionOption>& InteractOptions) = 0;
};